import config from "@/config";
import http from "@/utils/request";

export default {
	read: {
		url: `${config.API_URL}/usermessage/read`,
		name: "阅读消息",
		get: async function (data) {
			return await http.get(this.url + "/" + data);
		},
	},
	readAll: {
		url: `${config.API_URL}/usermessage/read/all`,
		name: "阅读消息",
		post: async function () {
			return await http.get(this.url);
		},
	},
	noRead: {
		url: `${config.API_URL}/usermessage/all/noread`,
		name: "获取未读消息",
		get: async function (size) {
			return await http.get(this.url + "?size=" + size);
		},
	},
	push: {
		url: `${config.API_URL}/usermessage/push`,
		name: "push 消息",
		post: async function (data) {
			return await http.post(this.url, data);
		},
	},
};
